# # for i in range(1,101):
# #     if i%3 == 0:
# #         print(i)
#
# import requests
# def baidu():
#     url = "https://www.baidu.com/"
#     headers = {
#         'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36 Edg/111.0.1661.44',
#
#     }
#     r = requests.get(url,headers=headers).text
#     print(r)
#
#
#
# if __name__ == '__main__':
#     baidu()
# 导入请求模块
import urllib.request
# 发送链接,获取相应
response = urllib.request.urlopen("https://www.imooc.com/")

content = response.read()
# 解码网页源代码
content = content.decode("utf-8")
print(content)
